#include <iostream>
#include <string>

template<typename T>
int get_value(T a, std::enable_if_t<!std::is_integral_v<T>, int>* = nullptr){
    return 0;
}

template<typename T>
int get_value(T a, decltype(a + 1)* = nullptr){
    return a;
}

template<typename T, std::enable_if_t<!std::is_integral_v<T>, int> = 0>
int get_valuex(T a){
    return 0;
}

template<typename T, typename = std::enable_if_t<std::is_integral_v<T>, int>>
int get_valuex(T a){
    return a;
}

int main() {
    std::cout << get_value(34) << ", "
        << get_value(std::string()) << std::endl;

    std::cout << get_valuex(34) << ", "
        << get_valuex(std::string()) << std::endl;
}
